<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Fullscreen Iframe Example</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 960px;
            width: 1280px;
            margin: 0;
            background-color: #f4f4f4;
            font-family: Arial, sans-serif;
        }
        button {
            padding: 10px 20px;
            margin-bottom: 20px;
            font-size: 16px;
            color: white;
            background-color: #007BFF;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            outline: none;
            transition: background-color 0.3s;
        }
        button:hover {
            background-color: #0056b3;
        }
        iframe {
            width: 100%;
            height: 80vh;
            border: none;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        .container {
            text-align: center;
            width: 80%;
        }
    </style>
</head>
<body>
    <div class="container">
        <button onclick="goFullScreen()">全屏显示</button>
        <iframe id="myIframe" src="http://192.168.1.120:3000"></iframe>
    </div>

    <script>
    function goFullScreen() {
        var iframe = document.getElementById('myIframe');
        if (iframe.requestFullscreen) {
            iframe.requestFullscreen();
        } else if (iframe.mozRequestFullScreen) {
            iframe.mozRequestFullScreen();
        } else if (iframe.webkitRequestFullscreen) {
            iframe.webkitRequestFullscreen();
        } else if (iframe.msRequestFullscreen) {
            iframe.msRequestFullscreen();
        }
    }
    </script>
</body>
</html>